CREATE TABLE [dbo].[TDAMAR_ANIN]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[NU_AMAR] [dbo].[TD_VC_008] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDAMAR_AN__NU_SE__10E07F16] DEFAULT ((0)),
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[FE_AMAR] [dbo].[TD_DT_001] NOT NULL,
[NU_PROC] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDAMAR_AN__NU_PR__11D4A34F] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDAMAR_AN__CO_US__12C8C788] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDAMAR_AN__FE_US__13BCEBC1] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDAMAR_AN__CO_US__14B10FFA] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDAMAR_AN__FE_US__15A53433] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDAMAR_ANIN] ADD CONSTRAINT [PK__TDAMAR_A__62C0BA0F59A6241C] PRIMARY KEY CLUSTERED  ([CO_EMPR], [NU_AMAR], [NU_SECU], [CO_UNID_CONC], [FE_AMAR], [NU_PROC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDAMAR_ANIN] ADD CONSTRAINT [FK__TDAMAR_ANIN__20238DFD] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR], [NU_SECU]) REFERENCES [dbo].[TDAMAR_ANTC] ([CO_EMPR], [CO_UNID_CONC], [NU_AMAR], [FE_AMAR], [NU_SECU])
GO
